import React from "react";
import Time from "./time";

import "./index.css";
import styles from "./index.module.css";

const JSXTest = () => {
    const name = "Diviner";
    const user = {
        name: "Diviner",
        age: 18,
        addr: "北京",
    };

    const getUserInfo = (user) => {
        return `用户名：${user.name} 年龄： ${user.age} 地址：${user.addr}`;
    };

    return (
        <div className={styles.box}>
            <h1>JSX简介</h1>
            <p className="p_color">昵称： {name}</p>
            <p>10 + 20 = {10 + 20}</p>
            <p>{getUserInfo(user)}</p>

            <Time />
        </div>
    );
};

export default JSXTest;
